package com.ethan.crm.mapper;

import com.ethan.crm.domain.Role;
import com.ethan.crm.query.BaseQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    int insertRelation(@Param("rid") Long rid,@Param("pid") Long pid);

    Long queryForPageCount(BaseQueryObject qo);

    List<Role> queryForPage(BaseQueryObject queryObject);

    void deletePermissionsByRid(Long id);

    List<Long> queryRolesByEid(Long eid);


}